<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../inc/conn.asp"-->
<%
Call QuanXian(GuestBook_B)
Call QuanXian1("$9$")
dim Action,sqlDel,rsDel,PurviewChecked
ID=trim(request("ID"))
Action=Trim(Request("Action"))

if ID="" or Action<>"Del" then
	TwScript("请选择要删除的序号!!!")
end if

if instr(ID,",")>0 then
	idArr=split(ID,",")
	for i = 0 to ubound(idArr)
		call DelArticle(idarr(i))
	next
else
	call DelArticle(ID)
end if

Response.Write("<script>alert('删除成功');window.location='Gbook.asp?Page="&Request("Page")&"'</script>")
Response.End()

sub DelArticle(ID)
	sqlDel="select * from Gbook where ID=" & ID
	Set rsDel= Server.CreateObject("ADODB.Recordset")
	rsDel.open sqlDel,conn,1,3
	if not(rsDel.eof or rsDel.eof) then
		rsDel.delete
		rsDel.update
    end if
	call rsclose(rsDel)
end sub
%>